﻿using System.Collections.ObjectModel;
using LFSRecord2.Model;

namespace LFSRecord2.Structures
{
    public class ExportAEDialogDataTemplate
    {
        public Collection<string> AvailableLayers { get; private set; }
        public Collection<string> SelectedLayers { get; private set; }
        public int MovieWidth { get; set; }
        public int MovieHeight { get; set; }
        public int StartFrame { get; set; }
        public int EndFrame { get; set; }

        public ExportAEDialogDataTemplate()
        {
            AvailableLayers = new Collection<string>();
            SelectedLayers = new Collection<string>();
            MovieWidth = 800;
            MovieHeight = 600;
        }

        public void PopulateTemplate(LfsRecordProject project)
        {
            StartFrame = 0;
            EndFrame = project.LastProjectKeyFrameNum();

            foreach (CompLayerBase layer in project.Layers)
            {
                if (layer.LayerType != CompLayerTypes.ReplayControl)
                    AvailableLayers.Add(layer.LayerName);
            }

            MovieWidth = project.RecordingWidth;
            MovieHeight = project.RecordingHeight;
        }
    }
}
